#ifndef CORE_HITABLELIST_H
#define CORE_HITABLELIST_H

#include "Hitable.h"
#include <memory>
#include <vector>
namespace RayTracer
{
	class HitableList : public Hitable 
	{
	public:
		HitableList() {}
		HitableList(std::shared_ptr<Hitable> object) { add(object); }

		void clear() { objects.clear(); }
		void add(std::shared_ptr<Hitable> object) { objects.push_back(object); }

		bool Hit(const Ray& r, float t_min, float t_max, HitRecord& rec) const;
		bool BoundingBox(AABB& output_box) const;
	public:
		std::vector<std::shared_ptr<Hitable>> objects;
	};
}
#endif // !CORE_HITABLELIST_H
